﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GsifWeb4.Models;
using System.Web.Mvc;

namespace GsifWeb4.ViewModels
{
    public class MatchViewModel
    {
        public match_gsif Match { get; set; }
        public SelectList Teams { get; set; }
        public SelectList HomeOrAway { get; set; }
        public SelectList TypeOfGame { get; set; }

        public MatchViewModel(match_gsif match)
        {
            Match = match;

            Teams = new SelectList(GsifWeb4.Team.AllTeams, GsifWeb4.Statuses.GetStatusFromDbValue(GsifWeb4.Team.AllTeams, match.Lag));
            HomeOrAway = new SelectList(GsifWeb4.HomeOrAway.AllStatuses, GsifWeb4.Statuses.GetStatusFromDbValue(GsifWeb4.HomeOrAway.AllStatuses, match.Plan));
            TypeOfGame = new SelectList(MatchType.AllStatuses, MatchType.GetStatusFromDbValue(MatchType.AllStatuses, match.Typ));
        }
    }
}